import { StoreContext } from "@/store"
import React from "react"

import { useContext, useEffect } from "react"
import { useNavigate } from "react-router"
import { useSearchParams } from "react-router-dom"

const Page: React.FC = () => {
  const { UserStore } = useContext(StoreContext)
  const nav = useNavigate()
  const [params] = useSearchParams()
  useEffect(() => {
    nav(UserStore.user ? "/home/dash" : "/auth/login", { replace: !0 })
  }, [])
  return <></>
}

export default Page
